gongzi=float(input("输入工资金额:"))
if gongzi>20000:
    shui=(gongzi-20000)*0.1+(20000-8000)*0.05+(8000-3500)*0.02
elif gongzi>8000:
    shui=(gongzi-8000)*0.05+(8000-3500)*0.02
elif gongzi>3500:
    shui=(gongzi-3500)*0.02
else:
    shui=0
print("应交个税金额:",shui)
